﻿<Window x:Class="EPE.WPF.DBConfigForm"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="数据库配置" Height="330" Width="280" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">
    <Window.Resources>
        <ResourceDictionary Source="/Resources/StylesResourceDictionary.xaml"></ResourceDictionary>
    </Window.Resources>
    <Grid>
        <Border Grid.Row="1" Style="{StaticResource MainBorderStyle}">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="35"/>
                    <RowDefinition Height="35"/>
                    <RowDefinition Height="35"/>
                    <RowDefinition Height="35"/>
                    <RowDefinition Height="35"/>
                    <RowDefinition Height="35"/>
                    <RowDefinition Height="35"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="80"/>
                    <ColumnDefinition Width="150"/>
                </Grid.ColumnDefinitions>
                <Label Grid.Row="0" Grid.Column="0" Content="服务器名称" VerticalAlignment="Center" Style="{StaticResource LabelStyle}" />
                <TextBox Grid.Row="0" Grid.Column="1" Name="txtServer" VerticalAlignment="Center" Style="{StaticResource TextBoxStyle}" />
                <Label Grid.Row="1" Grid.Column="0" Content="端口" VerticalAlignment="Center" Style="{StaticResource LabelStyle}" />
                <TextBox Grid.Row="1" Grid.Column="1" Name="txtPort" VerticalAlignment="Center" Style="{StaticResource TextBoxStyle}" />
                <Label Grid.Row="2" Grid.Column="0"  VerticalAlignment="Center" Content="数据库名称" Style="{StaticResource LabelStyle}" />
                <TextBox Grid.Row="2" Grid.Column="1" Name="txtDatabase" VerticalAlignment="Center" Style="{StaticResource TextBoxStyle}" />
                <Label Grid.Row="3" Grid.Column="0" Content="字符集" VerticalAlignment="Center" Style="{StaticResource LabelStyle}" />
                <ComboBox Grid.Row="3" Grid.Column="1" Name="cmbCharset"  VerticalAlignment="Center" Style="{StaticResource ComboBoxStyle}">
                    <ComboBoxItem Content="utf8" IsSelected="True"  />
                    <ComboBoxItem Content="gb2312" />
                    <ComboBoxItem Content="gbk" />
                    <ComboBoxItem Content="ascii" />
                </ComboBox>
                <Label Grid.Row="4" Grid.Column="0"  VerticalAlignment="Center" Content="用户名" Style="{StaticResource LabelStyle}" />
                <TextBox Grid.Row="4" Grid.Column="1" Name="txtUser" VerticalAlignment="Center" Style="{StaticResource TextBoxStyle}" />
                <Label Grid.Row="5" Grid.Column="0"  VerticalAlignment="Center" Content="密码" Style="{StaticResource LabelStyle}" />
                <PasswordBox Grid.Row="5" Grid.Column="1" Name="txtPwd"  VerticalAlignment="Center" Style="{StaticResource PasswordBoxStyle}" />
                <StackPanel Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="2" Orientation="Horizontal">
                    <Button   Name="btnOk" Click="btnOk_Click" Style="{StaticResource ButtonStyle}" >
                        <StackPanel Orientation="Horizontal" >
                            <Image Source="/Resources/image/close09.png" Stretch="Fill" Style="{StaticResource ButtonImageStyle}"></Image>
                            <Label Content="确定" HorizontalAlignment="Center"  Style="{StaticResource ButtonLabelStyle}"></Label>
                        </StackPanel>
                    </Button>
                    <Button   Name="btnClose" Click="btnClose_Click" Style="{StaticResource ButtonStyle}" >
                        <StackPanel Orientation="Horizontal" >
                            <Image Source="/Resources/image/close07.png" Stretch="Fill" Style="{StaticResource ButtonImageStyle}"></Image>
                            <Label Content="取消"  HorizontalAlignment="Center"  Style="{StaticResource ButtonLabelStyle}"></Label>
                        </StackPanel>
                    </Button>

                </StackPanel>
            </Grid>
        </Border>
    </Grid>
</Window>
